package sortAlgorithm.comparable;

/**
 * @author： pang-yun
 * @date： 2021-09-25 13:18
 * 功能目的 ：用于
 */

public class ComparableDemo {

    public static void main(String[] args) {
        Student pang = new Student("pang", 15);
        Student chao = new Student("chao", 14);
        System.out.println(getMax(pang, chao));
    }



    public static Comparable getMax(Comparable a,Comparable b){
        int i = a.compareTo(b);
        if (i>=0){return a;}else {return b;}
    }
}
